package com.turing.post.cardmanagement.util;

import java.math.BigInteger;
import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

/**
 * 卡挂失解挂失登记薄（CardLoss）
 * 
 * @author kz
 */

@Remote
@Local
public interface CardLossDao {

	/**
	 * 插入信息
	 * 
	 * @param cl
	 * @throws PCPSApplicationException
	 */
	public void insert(CardLoss cl) throws PCPSApplicationException;

	/**
	 * 修改信息
	 * 
	 * @param cl
	 * @throws PCPSApplicationException
	 */
	public void update(CardLoss cl) throws PCPSApplicationException;

	/**
	 * 修改卡挂失代理人，挂失人图片编号
	 * 
	 * @param cl
	 * @throws PCPSApplicationException
	 */
	public void updateCardLossImageId(BigInteger cardLossId, BigInteger imageId,boolean is)
			throws PCPSApplicationException;

	/**
	 * 根据卡挂失解挂失主键 获取卡挂失信息
	 * 
	 * @param cardLossId
	 * @return
	 */
	public CardLoss getCardLossByCardLossId(BigInteger cardLossId);

	/**
	 * 以锁定方式根据卡挂失解挂失主键 获取卡挂失信息
	 * 
	 * @param cardLossId
	 * @return
	 */
	public CardLoss getCardLossByCardLossIdForUpdate(BigInteger cardLossId);

	/**
	 * 查询卡挂失信息列表
	 * 
	 * @param webInput
	 * @param CardNo
	 * @param tranType
	 * @param cardHolder
	 * @param startTime
	 * @param endTime
	 * @param saleBranchNo
	 * @param page
	 * @return
	 */
	public List<CardLoss> getCardLossListByCondition(PCPSWebInput webInput,
			String cardNo, String tranType, String cardHolder,
			String startTime, String endTime, String saleBranchNo, Integer page);

	/**
	 * 查询卡挂失信息列表总数
	 * 
	 * @param webInput
	 * @param cardNo
	 * @param tranType
	 * @param cardHolder
	 * @param startTime
	 * @param endTime
	 * @param saleBranchNo
	 * @param page
	 * @return
	 */
	public BigInteger getCardLossTotalByCondition(PCPSWebInput webInput,
			String cardNo, String tranType, String cardHolder,
			String startTime, String endTime, String saleBranchNo);
}
